<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<head>
<title>学生成绩管理系统</title>
<link rel="stylesheet" type="text/css" id="css" href="../style/main.css" />
<link rel="stylesheet" type="text/css" id="css"
	href="../style/style1.css" />
<link rel="stylesheet" type="text/css" id="css"
	href="../style/style.css" />

<style type="text/css">
<!--
table {
	border-spacing: 1px;
	border: 1px solid #A2C0DA;
}

td, th {
	padding: 2px 5px;
	border-collapse: collapse;
	text-align: left;
	font-weight: normal;
}

thead tr th {
	height: 50px;
	background: #B0D1FC;
	border: 1px solid white;
}

thead tr th.line1 {
	background: #D3E5FD;
}

thead tr th.line4 {
	background: #C6C6C6;
}

tbody tr td {
	height: 35px;
	background: #CBE2FB;
	border: 1px solid white;
	vertical-align: middle;
}

tbody tr td.line4 {
	background: #D5D6D8;
}

tbody tr th {
	height: 35px;
	background: #DFEDFF;
	border: 1px solid white;
	vertical-align: middle;
}

tfoot tr td {
	height: 35px;
	background: #FFFFFF;
	border: 1px solid white;
	vertical-align: middle;
}
-->
</style>

<script src="js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/calendar.js"></script>
</head>
<c:if test="${!(empty sessionScope.message)}">
	<script type="text/javascript">
		alert('<c:out value="${sessionScope.message}"/>');
	</script>
	<c:remove var="message" scope="session" />
</c:if>
<body>
	<div id="btm">
		<div id="main">

			<div id="header">
				<div id="top"></div>
				<div id="logo">
					<h1>选课管理</h1>
				</div>
				<div id="mainnav">
					<ul>
						<li><a href="studentIndex.jsp">首页</a></li>
						<li><a href="scServlet?action=listTeacherC">课程选择</a></li>
						<li><a href="scServlet?action=showStudentC">信息查询</a></li>
						<li><a href="changePwd.jsp">密码修改</a></li>
						<li><a href="../logoutServlet">退出</a></li>
					</ul>
					<span id="right"> <c:choose>
							<c:when test="${sessionScope.user.userType==2}">
								<font color=red>状态：已登录&nbsp;&nbsp;用户类别：学生用户&nbsp;&nbsp;用户名：${sessionScope.user.name}&nbsp;&nbsp;</font>
							</c:when>

							<c:otherwise>
								<font color=red>状态：未登录&nbsp;&nbsp;</font>
							</c:otherwise>
						</c:choose>
					</span>
				</div>
			</div>
			<div id="tabsJ">
				<ul>
					<li><a href="scServlet?action=listTeacherC" title="选课管理"><span>选课管理</span></a></li>
					<li><a href="scServlet?action=listSchedule" title="课表显示"><span>课表显示</span></a></li>
				</ul>
			</div>
			<div id="content" align="center">
				<div id="center">
					<BR /> <BR />
					<form method="post" action="scServlet?action=checkTeacherC">
						<table width="800" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<td align="center" scope="col" colspan="12"><h4>选课管理-->当前已开设课程列表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h4></td>
							</tr>
							<tr>
								<td>
									<table width="100%">
										<thead>
											<tr>
												<th align="center" scope="col" colspan="12"><b><font
														color="red">请输入查询统计条件：</font></b></th>
											</tr>
											<tr>
												<th align="center" scope="col" colspan="2"><b>课程编号</b></th>
												<th align="center" scope="col" colspan="2"><input
													name="courseNo" value="${requestScope.courseNo }" /></th>
												<th align="center" scope="col" colspan="2"><b>课程名称</b></th>
												<th align="center" scope="col" colspan="2"><input
													name="courseName" value="${requestScope.courseName }" /></th>
												<th align="center" scope="col" colspan="2"><b>上课时间</b></th>
												<th align="center" scope="col" colspan="2"><select
													name="tcTime1"><c:if
															test="${requestScope.tcTime1==null}">
															<option value="0" selected>选择星期</option>
															<option value="1">星期一</option>
															<option value="2">星期二</option>
															<option value="3">星期三</option>
															<option value="4">星期四</option>
															<option value="5">星期五</option>
															<option value="6">星期六</option>
															<option value="7">星期日</option>
														</c:if>
														<c:if test="${requestScope.tcTime1==0}">
															<option value="0" selected>选择星期</option>
															<option value="1">星期一</option>
															<option value="2">星期二</option>
															<option value="3">星期三</option>
															<option value="4">星期四</option>
															<option value="5">星期五</option>
															<option value="6">星期六</option>
															<option value="7">星期日</option>
														</c:if>
														<c:if test="${requestScope.tcTime1==1}">
															<option value="0">选择星期</option>
															<option value="1" selected>星期一</option>
															<option value="2">星期二</option>
															<option value="3">星期三</option>
															<option value="4">星期四</option>
															<option value="5">星期五</option>
															<option value="6">星期六</option>
															<option value="7">星期日</option>
														</c:if>
														<c:if test="${requestScope.tcTime1==2}">
															<option value="0">选择星期</option>
															<option value="1">星期一</option>
															<option value="2" selected>星期二</option>
															<option value="3">星期三</option>
															<option value="4">星期四</option>
															<option value="5">星期五</option>
															<option value="6">星期六</option>
															<option value="7">星期日</option>
														</c:if>
														<c:if test="${requestScope.tcTime1==3}">
															<option value="0">选择星期</option>
															<option value="1">星期一</option>
															<option value="2">星期二</option>
															<option value="3" selected>星期三</option>
															<option value="4">星期四</option>
															<option value="5">星期五</option>
															<option value="6">星期六</option>
															<option value="7">星期日</option>
														</c:if>
														<c:if test="${requestScope.tcTime1==4}">
															<option value="0">选择星期</option>
															<option value="1">星期一</option>
															<option value="2">星期二</option>
															<option value="3">星期三</option>
															<option value="4" selected>星期四</option>
															<option value="5">星期五</option>
															<option value="6">星期六</option>
															<option value="7">星期日</option>
														</c:if>
														<c:if test="${requestScope.tcTime1==5}">
															<option value="0">选择星期</option>
															<option value="1">星期一</option>
															<option value="2">星期二</option>
															<option value="3">星期三</option>
															<option value="4">星期四</option>
															<option value="5" selected>星期五</option>
															<option value="6">星期六</option>
															<option value="7">星期日</option>
														</c:if>
														<c:if test="${requestScope.tcTime1==6}">
															<option value="0">选择星期</option>
															<option value="1">星期一</option>
															<option value="2" selected>星期二</option>
															<option value="3">星期三</option>
															<option value="4">星期四</option>
															<option value="5">星期五</option>
															<option value="6">星期六</option>
															<option value="7">星期日</option>
														</c:if>
														<c:if test="${requestScope.tcTime1==7}">
															<option value="0">选择星期</option>
															<option value="1">星期一</option>
															<option value="2">星期二</option>
															<option value="3">星期三</option>
															<option value="4">星期四</option>
															<option value="5">星期五</option>
															<option value="6">星期六</option>
															<option value="7" selected>星期日</option>
														</c:if>
												</select><select name="tcTime2">
														<c:if test="${requestScope.tcTime2==null}">
															<option value="0" selected>选择节次</option>
															<option value="1">第一节</option>
															<option value="2">第二节</option>
															<option value="3">第三节</option>
															<option value="4">第四节</option>
															<option value="5">第五节</option>
															<option value="6">第六节</option>
														</c:if>
														<c:if test="${requestScope.tcTime2==0}">
															<option value="0" selected>选择节次</option>
															<option value="1">第一节</option>
															<option value="2">第二节</option>
															<option value="3">第三节</option>
															<option value="4">第四节</option>
															<option value="5">第五节</option>
															<option value="6">第六节</option>
														</c:if>
														<c:if test="${requestScope.tcTime2==1}">
															<option value="0">选择节次</option>
															<option value="1" selected>第一节</option>
															<option value="2">第二节</option>
															<option value="3">第三节</option>
															<option value="4">第四节</option>
															<option value="5">第五节</option>
															<option value="6">第六节</option>
														</c:if>
														<c:if test="${requestScope.tcTime2==2}">
															<option value="0">选择节次</option>
															<option value="1">第一节</option>
															<option value="2" selected>第二节</option>
															<option value="3">第三节</option>
															<option value="4">第四节</option>
															<option value="5">第五节</option>
															<option value="6">第六节</option>
														</c:if>
														<c:if test="${requestScope.tcTime2==3}">
															<option value="0">选择节次</option>
															<option value="1">第一节</option>
															<option value="2">第二节</option>
															<option value="3" selected>第三节</option>
															<option value="4">第四节</option>
															<option value="5">第五节</option>
															<option value="6">第六节</option>
														</c:if>
														<c:if test="${requestScope.tcTime2==4}">
															<option value="0">选择节次</option>
															<option value="1">第一节</option>
															<option value="2">第二节</option>
															<option value="3">第三节</option>
															<option value="4" selected>第四节</option>
															<option value="5">第五节</option>
															<option value="6">第六节</option>
														</c:if>
														<c:if test="${requestScope.tcTime2==5}">
															<option value="0">选择节次</option>
															<option value="1">第一节</option>
															<option value="2">第二节</option>
															<option value="3">第三节</option>
															<option value="4">第四节</option>
															<option value="5" selected>第五节</option>
															<option value="6">第六节</option>
														</c:if>
														<c:if test="${requestScope.tcTime2==6}">
															<option value="0">选择节次</option>
															<option value="1">第一节</option>
															<option value="2">第二节</option>
															<option value="3">第三节</option>
															<option value="4">第四节</option>
															<option value="5">第五节</option>
															<option value="6" selected>第六节</option>
														</c:if>
												</select></th>
											</tr>
											<tr>
												<th align="center" scope="col" colspan="2"><b>任课教师</b></th>
												<th align="center" scope="col" colspan="2"><input
													name="teacherName" value="${requestScope.teacherName }" /></th>
												<th align="center" scope="col" colspan="2"><b>教学班号</b></th>
												<th align="center" scope="col" colspan="2"><input
													name="tcTeacherNo" value="${requestScope.tcTeacherNo }" /></th>
												<th align="center" scope="col" colspan="2"><b>课程学分</b></th>
												<th align="center" scope="col" colspan="2"><input
													name="credit" value="${requestScope.credit }" /></th>
											</tr>
											<tr>
												<th align="center" scope="col" colspan="12"><input
													type="submit" value="查询" /></th>
											</tr>
											<tr>
												<th width="15%" align="center" scope="col" colspan="2"><b>课程编号</b>
												</th>
												<th width="15%" align="center" scope="col" colspan="2"><b>课程名称</b>
												</th>
												<th width="15%" align="center" scope="col" colspan="2"><b>任课教师</b>
												</th>
												<th width="15%" align="center" scope="col" colspan="2"><b>上课时间</b>
												</th>
												<th width="15%" align="center" scope="col" colspan="1"><b>教学班号</b>
												</th>
												<th width="15%" align="center" scope="col" colspan="1"><b>课程学分</b>
												</th>
												<th width="10%" align="center" scope="col" colspan="1"><b>已选人数</b>
												</th>
												<th width="10%" align="center" colspan="1"><b>操作</b></th>
											</tr>
										</thead>
										<tbody>
											<c:forEach items="${requestScope.list}" var="teacherC">
												<tr>
													<td width="15%" align="center" colspan="2">${teacherC.courseNo }</td>
													<td width="15%" align="center" colspan="2">
														${teacherC.courseName }</td>
													<td width="15%" align="center" colspan="2">
														${teacherC.teacherName }</td>
													<td width="15%" align="center" colspan="2">${teacherC.tcTime }</td>
													<td width="15%" align="center" colspan="1">${teacherC.tcTeacherNo }</td>
													<td width="15%" align="center" colspan="1">${teacherC.credit }</td>
													<td width="10%" align="center" colspan="1">${teacherC.tcSel }/${teacherC.tcCapacity }</td>
													<td width="10%" align="center" colspan="1"><a
														href='<c:url value="scServlet?action=addStudentC&courseNo=${teacherC.courseNo}&tcTeacherNo=${teacherC.tcTeacherNo}&teacherNo=${teacherC.teacherNo}&courseName=${teacherC.courseName }&credit=${teacherC.credit }&tcTime=${teacherC.tcTime }"></c:url>'><font
															color=red>选课</a></td>
												</tr>
											</c:forEach>
										</tbody>

										<tbody>
											<tr>
												<td align="center" colspan="12"><c:if
														test="${requestScope.pageCount!=0&&requestScope.curPage!=1}">
														<a
															href='<c:url value="scServlet?action=checkTeacherC&curPage=1
																&courseNo=${requesrScope.courseNo}&courseName=${requesrScope.courseName}&tcTime1=${requesrScope.tcTime1}
																&tcTime2=${requesrScope.tcTime2}&tcTeacherNo=${requesrScope.tcTeacherNo}&teacherName=${requesrScope.teacherName}
																&credit=${requesrScope.credit} }"/>'>首页</a>
														<a
															href='<c:url value="scServlet?action=checkTeacherC&curPage=${requestScope.curPage-1}
																&courseNo=${requesrScope.courseNo}&courseName=${requesrScope.courseName}&tcTime1=${requesrScope.tcTime1}
																&tcTime2=${requesrScope.tcTime2}&tcTeacherNo=${requesrScope.tcTeacherNo}&teacherName=${requesrScope.teacherName}
																&credit=${requesrScope.credit}"/>'>前一页</a>
													</c:if> <c:if
														test="${requestScope.pageCount==0||requestScope.curPage==1}">首页 前一页</c:if>
													<c:if
														test="${requestScope.pageCount!=0&&requestScope.curPage!=requestScope.pageCount}">
														<a
															href='<c:url value="scServlet?action=checkTeacherC&curPage=${requestScope.curPage+1}
																&courseNo=${requesrScope.courseNo}&courseName=${requesrScope.courseName}&tcTime1=${requesrScope.tcTime1}
																&tcTime2=${requesrScope.tcTime2}&tcTeacherNo=${requesrScope.tcTeacherNo}&teacherName=${requesrScope.teacherName}
																&credit=${requesrScope.credit}"/>'>下一页</a>
														<a
															href='<c:url value="scServlet?action=checkTeacherC&curPage=${requestScope.pageCount}
																&courseNo=${requesrScope.courseNo}&courseName=${requesrScope.courseName}&tcTime1=${requesrScope.tcTime1}
																&tcTime2=${requesrScope.tcTime2}&tcTeacherNo=${requesrScope.tcTeacherNo}&teacherName=${requesrScope.teacherName}
																&credit=${requesrScope.credit}"/>'>尾页</a>
													</c:if> <c:if
														test="${requestScope.pageCount==0||requestScope.curPage==requestScope.pageCount}">下一页 尾页</c:if>
													&nbsp;
													第${requestScope.curPage}页/共${requestScope.pageCount}页
													&nbsp;</td>
											</tr>
										</tbody>

									</table>
								</td>
							</tr>
						</table>
					</form>
				</div>
			</div>

			<div id="footer">
				<div id="copyright">
					<div id="copy">
						<p align="center">CopyRight&copy;2016</p>
						<p>南京晓庄学院信息工程学院</p>
					</div>
				</div>
				<div id="bgbottom"></div>
			</div>

		</div>
	</div>
</body>
</html>
